<!DOCTYPE html>
<html>
<head>
    <title>apply的实现</title>
    <script src="../../src/function/apply.js"></script>
</head>
<body>
    <script>
        function add(a, b) {
            return a + b + this.c;
        }
        var obj = { c: 520 };
        window.c = 1314

        console.log(apply(add, obj, [1, 2])); // 523
        console.log(apply(add, null, [1, 2])); // 1317
    </script>
</html>